﻿<!DOCTYPE html>
<html>
    <head>
        <title>jQM Complex Demo</title>
        <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; minimum-scale=1.0; user-scalable=no; target-densityDpi=device-dpi"/>
        <link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
        <script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>    
   
   <script type="text/javascript">
       $(document).ready(function () {
           $(document).on('pageshow', '#index', function () {
               $("#tblSRNDetails").remove();
               $('<table>').attr({ 'id': 'tblSRNDetails', 'class': 'footable' }).appendTo('[data-role="content"]');
               $("#tblSRNDetails").append(
            "<thead><tr>" +
            "<th data-class='expand'>SRN</th>" +
            "<th >Failure Date</th>" +
            "<th >Complaint Report Date</th>" +
            "<th>Promised Date</th>" +
            "<th >Customer Name</th>" +
            "<th >Log Time</th>" +
            "<th >Create FSR</th>" +
            "<th  data-hide='phone,tablet'>Days Open</th>" +
            "<th  data-hide='phone,tablet'>SRN Allocated Time</th>" +
            "<th  data-hide='phone,tablet'> SRN Status</th>" +
            "<th  data-hide='phone,tablet'> ESN Number</th>" +
            "<th  data-hide='phone,tablet'> Request Type</th>" +
            "<th  data-hide='phone,tablet'>Service Request Details</th>" +
            "</tr></thead>");
               for (var indx = 0; indx < 2; indx++) {
                   $("#tblSRNDetails").append(
            "<tbody><tr>" +
            "<td>Name</td>" +
            "<td>failureDate</td>" +
            "<td>complaintReportDate</td>" +
            "<td>promisedDate</td>" +
            "<td>custName</td>" +
            "<td><a href='#'><b>Log Time</b></a></td>" +
            "<td><b>Create FSR</b></td>" +
            "<td>daysOpen</td>" +
            "<td>allocatedTime</td>" +
            "<td>srn_status</td>" +
            "<td>ESNNumber</td>" +
            "<td>requestType</td>" +
            "<td>customerComplaint</td>" +
            "</tr></tbody>");
               }
               $('#tblSRNDetails').footable();
           });

           $(document).on('pagebeforeshow', '#second', function () {

           });
       });

    
   </script>
   
    </head>
    <body>
        <div data-role="page" id="index">
            <div data-theme="a" data-role="header">
                <h3>
                    First Page
                </h3>
                <a href="#second" class="ui-btn-right">Next</a>
            </div>
            
            <div data-role="content">

            </div>
            
            <div data-theme="a" data-role="footer" data-position="fixed">
                
            </div>
        </div> 
        <div data-role="page" id="second">
            <div data-theme="a" data-role="header">
                <h3>
                    Second Page
                </h3>
                <a href="#index" class="ui-btn-left">Back</a>
            </div>
            
            <div data-role="content">
                
            </div>
            
            <div data-theme="a" data-role="footer" data-position="fixed">
                
            </div>
        </div>    
    </body>
</html>